for( var|x> in superposition): statements ... end: for each ket in superposition, set var|x> to that ket and then compile and run the given statements If instead you specify a sequence, then repeat the above for each superposition in that sequence